package com.ppt.javappt.util;

import javafx.scene.control.Alert;

/**
 * @author cys
 * 用于 弹出对话框
 */
public class AlertUtil {
    // 显示提示对话框
    public static void showAlert(String title, String message) {
        Alert alert = new Alert(Alert.AlertType.INFORMATION);
        alert.setTitle(title);
        alert.setHeaderText(null);
        alert.setContentText(message);
        alert.showAndWait();
    }
    // 显示确认对话框
    public static Alert showConfirmAlert(String title,String message){
        Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
        alert.setTitle(title);
        alert.setHeaderText(null);
        alert.setContentText(message);
        alert.showAndWait();
        return alert;
    }
}
